package org.dromara.system.domain.bo;

import org.dromara.system.domain.SysAgent;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.hibernate.validator.constraints.Length;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

import java.util.Date;
import java.io.Serial;
import java.io.Serializable;

/**
 * 代理商业务对象 sys_agent
 *
 * @author yixiacoco
 * @date 2025-09-03
 */
@Data
@AutoMapper(target = SysAgent.class, reverseConvertGenerate = false)
public class SysAgentBo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 代理商id
     */
    @NotBlank(message = "代理商id不能为空", groups = {EditGroup.class})
    @Length(max = 36, message = "代理商id不能大于{max}个字符", groups = {EditGroup.class})
    private String agentId;
    /**
     * 父级代理商id
     */
    @Length(max = 36, message = "父级代理商id不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String parentAgentId;
    /**
     * 代理商名称
     */
    @NotBlank(message = "代理商名称不能为空", groups = {AddGroup.class, EditGroup.class})
    @Length(max = 100, message = "代理商名称不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String agentName;
    /**
     * 代理商编号
     */
    private String agentCode;
    /**
     * 代理层级 1级、2级、3级
     */
    @NotNull(message = "代理层级 1级、2级、3级不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer level;
    /**
     * 0 禁用，启用 1
     */
    private Integer status;
    /**
     * 代理所属地区（省/市）
     */
    @Length(max = 100, message = "代理所属地区（省/市）不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String region;
    /**
     * 联系方式（电话/邮箱）
     */
    @Length(max = 255, message = "联系方式（电话/邮箱）不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String contactInfo;
    /**
     * 联系人
     */
    @NotBlank(message = "联系人不能为空", groups = {AddGroup.class, EditGroup.class})
    @Length(max = 50, message = "联系人不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String contactName;
    /**
     * 开户银行名称
     */
    @Length(max = 100, message = "开户银行名称不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String bankName;
    /**
     * 账户名称
     */
    @Length(max = 100, message = "账户名称不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String accountName;
    /**
     * 银行账号
     */
    @Length(max = 50, message = "银行账号不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String bankAccount;
    /**
     * 开户支行
     */
    @Length(max = 100, message = "开户支行不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String bankBranch;
    /**
     * 结算周期：1-月结，2-季结，3-年结
     */
    private Integer settlementCycle;
    /**
     * 结算费率（百分比）
     */
    private BigDecimal settlementRate;
    /**
     * 税号
     */
    @Length(max = 50, message = "税号不能大于{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String taxNumber;
}
